using System;
using System.Collections.Generic;
using System.Text;
using DTO;
using System.Data;
namespace DAO
{
    class PhongDAO
    {
        public static bool InsertPhong(PhongDTO pDTO)
        {
            DataProvider d = new DataProvider();
            String strSQL = "INSERT INTO PHONG(MaPhong,TenPhong)";
            strSQL += " VALUES ('" + pDTO.MaPhong + "',N'" + pDTO.TenPhong + "')";
            d.ExecuteQuery(strSQL);
            return true;
        }
        public static DataTable getListPhong()
        {
            DataProvider d = new DataProvider();
            string strSQL = "SELECT * FROM PHONG";
            return d.ExecuteQuery(strSQL);
        }
    }
}
